package cn.itsource.feignclient;

import cn.itsource.fallback.FastdfsFallbackFactory;
import cn.itsource.util.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

//负载均衡器负载调用redis数据库,调用哪个服务
@FeignClient(value = "fastdfs-server",fallbackFactory = FastdfsFallbackFactory.class)
public interface FastdfsFeignClientt {
    @PostMapping("/fastdfs/download")
     byte[] download(@RequestParam("filePath") String filePath);
    //todo+2
    @PostMapping("/fastdfs/uploadfile")
    public AjaxResult uploadFile(@RequestBody byte[] file, @RequestParam("extName") String extName );
}
